require 'scene'


function onSessionOpened()
	print("Session opened with server!")
	login.login(3)
end

function onSessionClosed()
	print("Session closed with server!")
end

function onAuthRespons(aid)
	print("Auth Response")
end

function onSelectSvrResponse()
	print("Select Svr Response")
end

function onLoginResponse(players)
	print("Login successfully!")
	local pid = 0
	for k, player in ipairs(players) do
		print (player)
		player = "return " .. player
		local val = loadstring(player)
		if val then
			player = val()
		end

		players[k] = player
		pid = player.pid
	end

	log.info("try to enter player : ", pid)
	login.enter(5)
end

function onEnterGameResponse()
	print("On Enter Game")
end

function onCreatePlayerResponse()
	print("On Create Player")
end


function onDeletePlayerResponse()
	print("On Delete Player")
end
